import http from '@/utils/axios'

// 获取文件表格数据
export const getStuTableAPI = (pageSize: null | number, currentPage: number) =>
  http<any, any>({
    url: '/user/getStuTable',
    method: 'POST',
    data: {
      pageSize,
      currentPage,
    },
  })
// 删除文件表格
export const deleteFileAPI = () =>
  http<any, any>({
    url: '/user/deleteFile',
    method: 'POST',
  })
// 通过信息对用户搜索
export const searchTableInfoAPI = (
  data: string | null,
  selectName?: string,
  pageSize?: number | null,
  currentPage?: number,
) =>
  http<any, any>({
    url: '/user/searchTableInfo',
    method: 'POST',
    data: {
      data,
      selectName,
      pageSize,
      currentPage,
    },
  })
// 分页数据
// export const returnPageListDataAPI = (
//   pageSize: null | number,
//   currentPage: number,
// ) =>
//   http<any, any>({
//     url: '/user/returnPageListData',
//     method: 'POST',
//     data: {
//       pageSize,
//       currentPage,
//     },
//   })
export const getTableDataAPI = () =>
  http<any, any>({
    url: '/user/getTableData',
    method: 'post',
  })
